home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u1.d64
/
base.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
546b
|
26 lines
10 POKE53272,21:POKE53280,1:POKE53281,1:REM C64 MODS 1983 BY WIM
100 PRINT"[144]NUMBER CONVERTER FROM BASE B1 TO B2
105 [153]"IF B1 OR B2 = 0 IE,, OLD VALUE ASSUMED
120 C$="0123456789ABCDEF
125 [153]:[153]"NUMBER,BASE,NEWBASE";
130 [133] D$,X1,X2
140 [139]X1[179][177]0[167]B1[178]X1
150 [139]X2[179][177]0[167]B2[178]X2
160 [153],,,,D$" BASE"B1;" = ";
170 N[178]0
180 [129] I[178]1 [164] [195](D$)
190 A$[178][202](D$,I,1)
200 [129] J[178]1 [164] B1
210 [139] A$ [178] [202](C$,J,1) [137] 240
220 [130] J
230 [153]"DIGIT NOT RECOGNIZED":[137]125
240 N[178]N[172]B1[170]J[171]1
250 [130] I
260 D$[178]""
270 K[178][181](N[173]B2)
280 I[178]N[171]B2[172]K
300 D$[178][202](C$,I[170]1,1)[170]D$ : N[178]K
320 [139] N[177]0 [137] 270
330 [153] D$" BASE"B2
340 [137] 125